<template>
    <view class="ikz-cells-after-title" :style="'margin-top:'+cssInfo.margin_top+'rpx;background-color:'+cssInfo.background_color+';width:'+cssInfo.width+'%;border-radius:'+cssInfo.border_radius+'rpx;'">
      <block v-for="(item,index) in showData.list" :key="index">
        <!--分享和客服功能-->
       <!-- <block wx:if="{{item.url.path=='share'||item.url.path=='contact'}}">
          <view class="ikz-cell ikz-cell-access" hover-class="ikz-cell-active" hover-stay-time="100">
            <view class="ikz-list-left">
              <block wx:if="{{item.src}}">
                <image src="{{item.src}}" style="margin-right: 5px;width:20px; height: 20px;"></image>
              </block>
              <view class="ikz-cell-bd ikz-list-title" style='color:{{cssInfo.color}}'>{{item.title}}</view>
            </view>
            <view class="ikz-list-right">
    
              <block wx:if="{{item.desc}}">
                <view class="ikz-cell-ft ikz-list-desc">{{item.desc}}</view>
              </block>
              <block wx:if="{{cssInfo.tips=='true'}}">
                <view class="ikz-cell-ft ikz-cell-ft-in-access"></view>
              </block>
            </view>
    
            <button class='ikz-login-button' open-type="{{item.url.path}}"></button>
          </view>
        </block> -->
        <!--分享和客服功能-->
    
        <!--正常功能-->
        <!-- <block wx:else> -->
          <view class="ikz-cell ikz-cell-access" hover-class="ikz-cell-active" hover-stay-time="100" @click="directToPath" :data-info="item">
            <view class="ikz-list-left">
              <block v-if="item.src">
                <image :src="item.src" style="margin-right: 5px;width:20px; height: 20px;"></image>
              </block>
              <view class="ikz-cell-bd ikz-list-title" :style="'color:'+cssInfo.color">{{item.title}}</view>
            </view>
            <view class="ikz-list-right" v-if="item.desc || cssInfo.tips">
              <block v-if="item.desc">
                <view class="ikz-cell-ft ikz-list-desc">{{item.desc}}</view>
              </block>
              <block v-if="cssInfo.tips">
                <view class="ikz-cell-ft ikz-cell-ft-in-access"></view>
              </block>
            </view>
          </view>
        <!-- </block> -->
        <!--正常功能-->
      </block>
    </view>
</template>

<script>
  import ikz from "@/pages/Common/tools"
  export default {
  	name: 'banner',
  	props: {
  		showData: {
  			type: Object,
  		},
  		cssData:{
  			type: Object,
  		}
  	},
  	data() {
  		return {
  		cssInfo:{}
  		};
  	},
  	watch: {
  		showData: {
  			handler(newName, oldName) {
  			},
  			immediate: true,
  			deep: true
  		},
  		cssData: {
  			handler(newName, oldName) {
          console.log(newName)
  				this.cssInfo = {
  					margin_top : newName.margin_top||0,
  					background_color : newName.background_color||'',
  					border_radius : newName.border_radius||0,
            
  				}
  			},
  			immediate: true,
  			deep: true
  		}
  	},
  	mounted() {
  
  	},
  	methods: {
      directToPath(e){
        this.$emit('returnList',e.currentTarget.dataset.info)
      },
  		change: function(e) {
  			this.current = e.detail.current;
  		},
  		
  	}
  };
</script>

<style scoped>
  .ikz-cells {
    position: relative;
    line-height: 1.41176471;
    font-size: 17px;
    margin:0 auto;
  }
  .ikz-cellss {
    position: relative;
    line-height: 1.41176471;
    font-size: 17px;
    margin:0 auto;
  }
  
  .ikz-login-button {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    opacity: 0;
    border: 0px;
    z-index: 100;
  }
  
  .ikz-cells:before {
    top: 0;
    border-top: 1rpx solid #d9d9d9;
  }
  
  .ikz-cells:after, .ikz-cells:before {
    content: " ";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    color: #d9d9d9;
  }
  
  .ikz-cells:after {
    bottom: 0;
    border-bottom: 1rpx solid #d9d9d9;
  }
  
  .ikz-cells__title {
    margin-top: 0.77em;
    margin-bottom: 0.3em;
    padding-left: 15px;
    padding-right: 15px;
    color: #999;
    font-size: 14px;
  }
  
  .ikz-cells-after-title {
    margin-top: 0;
  }
  
  .ikz-cells__tips {
    margin-top: 0.3em;
    color: #999;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 14px;
  }
  
  .ikz-cell {
    height: 100rpx;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0px 15rpx 0px 30rpx;
  }
  
  .ikz-cell:before {
    content: " ";
    position: absolute;
    top: 0;
    right: 0;
    height: 1px;
    border-top: 1rpx solid #d9d9d9;
    color: #d9d9d9;
    left: 15px;
  }
  
  .ikz-cell:first-child:before {
    display: none;
  }
  
  .ikz-cell-active {
    opacity: 0.5;
  }
  
  .ikz-cell_primary {
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
  }
  
  .ikz-cell-bd {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    font-size: 34rpx;
  }
  
  .ikz-cell-ft {
    text-align: right;
    color: #999;
    margin-right: 15rpx;
    font-size: 32rpx;
  }
  
  .ikz-cell-access {
    color: inherit;
  }
  
  .ikz-cell-ft-in-access {
    padding-right: 13px;
    position: relative;
  }
  
  .ikz-cell-ft-in-access:after {
    content: " ";
    display: inline-block;
    height: 6px;
    width: 6px;
    border-width: 2px 2px 0 0;
    border-color: #c8c8cd;
    border-style: solid;
    -webkit-transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
    transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
    top: -2px;
    position: absolute;
    top: 50%;
    margin-top: -4px;
    right: 2px;
  }
  
  .ikz-list-left {
    display: flex;
    align-items: center;
    padding-right: 10rpx;
  }
  
  .ikz-list-right {
    width: 60%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .ikz-list-title {
    overflow: hidden;
    white-space: nowrap;
  }
  
  .ikz-list-desc {
    overflow: hidden;
    white-space: nowrap;
  }

</style>
